/**
 * 引擎管理实现,包括两个方法：查询、更新
 */
package com.axt.dbaudit.bean.cfg;

import java.util.List;

import com.axt.dbaudit.base.MsgFuncExt;
import com.axt.dbaudit.model.cfg.EngineMgr;
import com.axt.soa.bean.BaseFuncBean;
import com.axt.soa.msg.types.MsgParam;

public class EngineMgrBean extends BaseFuncBean{
	/**
	 * 更新引擎管理的参数
	 * @param aEngineMgr
	 * @return boolean
	 */
	public int updateEnginMgr(String serverPath, EngineMgr engineMgr)
	{
		prepare(serverPath);
	
		request.addParam(MsgParam.MSG_COL_AU_BACKTIME, engineMgr.getBackTime());
		request.addParam(MsgParam.MSG_COL_AU_DISKALARM, engineMgr.getDiskAlarm());
		request.addParam(MsgParam.MSG_COL_AU_DISKLOW, engineMgr.getDiskLow());
		request.addParam(MsgParam.MSG_COL_AU_DISKLOWOPER, engineMgr.getDiskLowOper());
		request.addParam(MsgParam.MSG_COL_AU_STORETIME, engineMgr.getStoreTime());
		return execute(MsgFuncExt.FUNC_UPDATE_ENGINEMGR_CFG, CONN_T_TCP);
	}
	/**
	 * 查询引擎管理的参数
	 * @return EngineMgr
	 */
	public List<EngineMgr> queryEngineMgr(String serverPath)
	{
		prepare(serverPath);
		
		return fetch(MsgFuncExt.FUNC_QUERY_AUDIT_TG_SERVER,
				"com.axt.dbaudit.model.EngineMgr","EngineMgr",CONN_T_TCP);
	}
}
